Skip to content

Move ONNX inference to Web Worker for smooth animations#266

Closed
BasedBerry wants to merge 2 commits into
mainfrom
maia3-launch
Closed

Move ONNX inference to Web Worker for smooth animations#266
BasedBerry wants to merge 2 commits into
mainfrom
maia3-launch

Conversation

@BasedBerry
Copy link
Copy Markdown
Contributor

Run maia3 inference in a dedicated Web Worker so the main thread is never blocked. Board animations, eval bar transitions, and UI interactions stay fully responsive while the ~120ms batch inference runs in the background. Restore all 21 rating levels (step 100).

  • Add public/maia-worker.js with model loading, caching, and inference
  • Add public/ort/ with onnxruntime-web WASM runtime files
  • Refactor maia.ts to communicate via postMessage/onmessage
  • Simplify useEngineAnalysis back to single batch (no chunking needed)

Run maia3 inference in a dedicated Web Worker so the main thread is
never blocked. Board animations, eval bar transitions, and UI
interactions stay fully responsive while the ~120ms batch inference
runs in the background. Restore all 21 rating levels (step 100).

- Add public/maia-worker.js with model loading, caching, and inference
- Add public/ort/ with onnxruntime-web WASM runtime files
- Refactor maia.ts to communicate via postMessage/onmessage
- Simplify useEngineAnalysis back to single batch (no chunking needed)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
maia-platform-frontend Ready Ready Preview, Comment Mar 27, 2026 10:56pm

Request Review

The drill controller calls the client-side ONNX engine for policy
evaluation. Update both call sites from the removed batchEvaluate
(maia2) to batchEvaluateMaia3.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants